using System;
using Voodoo.Sauce.Internal.CrossPromo.Models;

namespace Voodoo.Sauce.Internal.CrossPromo
{
	internal class EventManager
	{
		public delegate void InitEventHandler(string format);

		public delegate void EventHandler(AssetModel asset);

		public delegate void ErrorHandler(Exception message);

		public event InitEventHandler initComplete;

		public event EventHandler click;

		public event EventHandler shown;

		public event ErrorHandler error;

		public void InitComplete(string format)
		{
			if (this.initComplete != null)
			{
				this.initComplete(format);
			}
		}

		public void ClickEvent(AssetModel asset)
		{
			if (this.click != null)
			{
				this.click(asset);
			}
		}

		public void ShownEvent(AssetModel asset)
		{
			if (this.shown != null)
			{
				this.shown(asset);
			}
		}

		public void ErrorEvent(Exception message)
		{
			if (this.error != null)
			{
				this.error(message);
			}
		}
	}
}
